const fs = require("fs-extra")
const path = require("path")
const { glob, Glob } = require("glob")
const readSrcVue = async () => {
  const vueFile = await glob("./src/**/*.vue")
  const fileList = vueFile.map((file) => {
    const filePath = path.join(__dirname, file)
    const content = fs.readFileSync(filePath, {
      encoding: "utf-8",
    })
    return {
      filePath,
      content,
    }
  })
  return fileList
}
module.exports = readSrcVue
